bitwise xor in python

48

a = 10 # = 1010 (Binary)
b = 4 # =  0100 (Binary)

a ^ b # = 1110
      # = 14 (Decimal)

Comments

Submit
0 Comments